"""
健康检查路由
"""
from fastapi import APIRouter
from datetime import datetime

router = APIRouter()


@router.get("/")
async def root():
    """根路径健康检查"""
    return {
        "message": "Hello World",
        "timestamp": datetime.now().isoformat(),
        "status": "healthy"
    }


@router.get("/health")
async def health_check():
    """健康检查端点"""
    return {
        "status": "healthy",
        "timestamp": datetime.now().isoformat(),
        "service": "FastAPI Project"
    }


@router.get("/hello/{name}")
async def say_hello(name: str):
    """问候接口"""
    return {
        "message": f"Hello {name}",
        "timestamp": datetime.now().isoformat()
    }
